package class2;

public class Rect extends Shape{
    private int len;
    private int hei;

    public int getLen() {
        return len;
    }

    public void setLen(int len) {
        this.len = len;
    }

    public int getHei() {
        return hei;
    }
    public static void test1(){
        System.out.println("我是字类中的静态方法");
    }
    public void setHei(int hei) {
        this.hei = hei;
    }

    public Rect(int len, int hei) {
        super(1,2);
        this.len = len;
        this.hei = hei;
    }

    public void show2(){
        System.out.println("我是子类独有的");
    }
    public Rect(int x,int y,int len,int hei){
        super(x,y);
        setHei(hei);
        setLen(len);
    }
    @Override
    public void show() {
        super.show();
        System.out.println("长高分别为"+this.hei+this.len);
    }

}
